package com.test.langchain4j.controller;

import com.test.langchain4j.service.Context7McpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import reactor.core.publisher.Flux;

/**
 * Created with IntelliJ IDEA.
 *
 * @description:
 * @author: liuziyang
 * @since: 2025/8/8 15:18
 * @modifiedBy:
 * @version: 1.0
 */
// @RestController
public class DocMcpCallServerController {
  @Autowired private Context7McpService context7McpService;

  @GetMapping("/mcp/context/chat")
  public Flux<String> chatContext7(@RequestParam("question") String question) {
    return context7McpService.chat(question);
  }
}
